<!-- "script/apps/Aries/Creator/Game/Login/SelectLoginModePage.html" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>2009.8.2</title>
</head>
<body> 
<pe:mcml>
<script type="text/npl"><![CDATA[
local page = document:GetPageCtrl();
local MainLogin = commonlib.gettable("MyCompany.Aries.Game.MainLogin");
NPL.load("(gl)script/apps/Aries/Creator/Game/Login/Rebranding.lua");
Rebranding = commonlib.gettable("MyCompany.Aries.Creator.Game.Rebranding");

-- @param name: "local", "internet"
function OnSelect()
    System.options.loginmode = "local";
    page:CloseWindow();
    MainLogin:next_step({IsLoginModeSelected = true});
end

function OnOpenModulePage()
    NPL.load("(gl)script/apps/Aries/Creator/Game/Login/SelectModulePage.lua");
    local SelectModulePage = commonlib.gettable("MyCompany.Aries.Game.MainLogin.SelectModulePage")
    SelectModulePage.ShowPage()
end

function OnChangeLanguagePage()
    NPL.load("(gl)script/apps/Aries/Creator/Game/Common/Translation.lua");
    local Translation = commonlib.gettable("MyCompany.Aries.Game.Common.Translation")
    Translation.ShowPage(function()
        page:Refresh(0.01);
    end);
end

function GetModDes()
    local modname = ParaEngine.GetAppCommandLineByParam("mod","");
    local s = string.format(L"当前Mod:%s",modname);
    return s;
end

function OnCustomCharacter()
end

function OnClickDonate()
    MainLogin.donate_window = MainLogin.donate_window or System.Windows.Window:new();
    MainLogin.donate_window:Show({url="script/apps/Aries/Creator/Game/Login/DonatePage.html", alignment="_rb", left=-210, top=-200, width=200, height=200, zorder=10, allowDrag=true});
    ParaGlobal.ShellExecute("open", L"http://www.nplproject.com/paracraft-donation", "", "", 1);
end

function OnClickCredits()
    ParaGlobal.ShellExecute("open", L"https://github.com/LiXizhi/ParaCraftSDK/wiki/Credits", "", "", 1);
end
    
    
]]></script>
<pe:container alignment="_ct" style="position:relative;background:;margin-left:-260px;margin-top:-200px;width:520px;height:500px;">
    <div style='<%=L"position:relative;margin-left:0px;margin-top:-10px;width:512px;height:177px;background:url(Texture/Aries/Creator/Mobile/blocks_Background.png#0 259 512 175);"%>'>
    </div>
    <pe:if condition='<%=Rebranding:GetValue("companylogo")~=nil%>'>
        <div style='<%=format("position:relative;margin-top:15px;margin-left:-220px;width:256px;height:64px;background:url(%s)", Rebranding:GetValue("companylogo"))%>'></div>
    </pe:if>
    <pe:if condition='<%=Rebranding:GetValue("company")~=nil and not Rebranding:GetValue("companylogo")%>'>
        <div style="position:relative;margin-top:15px;margin-left:-220px;color:#572712"><%=Rebranding:GetValue("company")%></div>
    </pe:if>
    <div style="position:relative;margin-left:0px;width:480px;margin-top:150px;color:#572712;font-size:14px;text-align:center">
        <%=Rebranding:GetValue("titleaddon") or L"免费的电影创作工具"%>
    </div>
    <div style="margin-top:178px;margin-left:120px;">
        <input type="button" value='<%=L"开启创意世界" %>' class="mc_big_button" style="font-size:18px;font-weight:bold;color:#572712;shadow-quality:8;shadow-color:#f0cec8c4;text-shadow:true;text-offset-y:-8;width:240px;height:120px;" name="internet" onclick="OnSelect" />
    </div>
    <div style="margin-top:16px;margin-left:110px;">
        <pe:if condition='<%= System.options.isDevEnv == false %>'>
            <input type="button" value='<%=L"MOD加载..." %>' class="mc_big_button" style="margin-top:16px;color:#572712;font-size:14px;width:256px;height:36px;" onclick="OnOpenModulePage" />    
            <input type="button" value='<%=L"语言..." %>' spacing="20" class="mc_big_button" style="margin-top:16px;color:#572712;font-size:14px;height:36px;margin-left:20px" onclick="OnChangeLanguagePage" />    
        </pe:if>
        <!--<input type="button" enabled="false" value='<%=L"更多设定..." %>' class="mc_big_button" style="margin-top:16px;font-size:14px;width:256px;height:36px;" onclick="OnCustomCharacter" />-->
        <pe:if condition='<%= System.options.isDevEnv == true %>'>
            <div style="margin-left:-40px;margin-top:6px;font-size:14px;width:336px;height:36px;color:#FF3030;text-align:center;font-weight:bold">
                <%=L"开发者模式" %><br/>
                <%= GetModDes()%>
            </div>
        </pe:if>
    </div>
</pe:container>
<!--persistent setting button-->
<pe:container alignment="_rb" style="position:relative;background:;width:300px;height:50px;">
    <input type="button" value='<%="Credits"%>' align="right" spacing="20" class="mc_light_grey_button_with_fillet" style="position:relative;font-size:14px;height:36px;margin-right:160px" onclick="OnClickCredits" />
    <pe:if condition='<%=Rebranding:GetValue("donation")~="false"%>'>
        <input type="button" value='<%=L"捐赠" %>' align="right" spacing="20" class="mc_light_grey_button_with_fillet" style="font-size:14px;height:36px;margin-right:20px" onclick="OnClickDonate" />
    </pe:if>
</pe:container>
</pe:mcml>
</body>
</html>